package com.atguigu.gmall.seckill.service;

import com.atguigu.gmall.seckill.entity.SeckillGoods;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;

/**
* @author lfy
* @description 针对表【seckill_goods】的数据库操作Service
* @createDate 2022-10-25 08:59:31
*/
public interface SeckillGoodsService extends IService<SeckillGoods> {


    /**
     * 获取指定日期参与秒杀的所有商品
     * @param formatDate
     * @return
     */
    List<SeckillGoods> getSeckillGoodsByDate(String formatDate);

    /**
     * 扣除指定商品库存
     * @param skuId
     * @param i
     */
    void deduceStock(Long skuId, int i);
}
